import request from '@/router/axios'

// 分页列表
export const getList = (data) => {
  return request({
    url: '/backend/taskConfig/getPage',
    method: 'post',
    data
  })
}

// 删除
export const getListdelete = (params) => {
  return request({
    url: '/backend/taskConfig/delete',
    method: 'post',
    params
  })
}

// 新增或修改
export const getListedit = (data) => {
  return request({
    url: '/backend/taskConfig/edit',
    method: 'post',
    data
  })
}

// 启用或停用
export const getListenable = (params) => {
  return request({
    url: '/backend/taskConfig/enable',
    method: 'post',
    params
  })
}

// 详情
export const getById = (params) => {
  return request({
    url: '/backend/taskConfig/getById',
    method: 'post',
    params
  })
}

// 获取排序列表
export const getSortList = () => {
  return request({
    url: '/backend/taskConfig/getSortList',
    method: 'post'
  })
}

// 排序
export const getsort = (params) => {
  return request({
    url: '/backend/taskConfig/sort',
    method: 'post',
    data: params
  })
}

// 获取任务标签下拉列表
export const getEnumList = () => {
  return request({
    url: '/backend/taskLabel/getEnumList',
    method: 'post'
  })
}

// 根据类型获取枚举
export const getDict = (params) => {
  return request({
    url: '/commConfig/getDict',
    method: 'post',
    params
  })
}
